ÍQuickDraw GX ObjectsContentsFigures, Tables, and ListingsAbout This Book5Figure P-1 Roadmap to the QuickDraw GX suite of booksWhat to ReadChapter OrganizationConventions Used in This BookSpecial FontsTypes of NotesNumerical Formats!Type Definitions for EnumerationsIllustrationsDevelopment EnvironmentDeveloper Products and SupportIntroduction to QuickDraw GXWhat Is QuickDraw GX?Color Graphics
TypographyPrintingWhat QuickDraw GX Is NotQuickDraw GX Objects'Figure 1-1 Several QuickDraw GX objects How QuickDraw GX Defines Objects'Advantages of an Object-Based StructureKinds of QuickDraw GX Objects Shape ObjectsSupporting Objects4Figure 1-2 A shape object and its referenced objectsPrinting ObjectsFigure 1-3 Printing objectsObject Properties&Default Objects and Default Properties'Adding Custom Behavior With Tag ObjectsObjects and Memory*Application Memory and QuickDraw GX Memory&Sharing and Multiple Object ReferencesOwner CountCloning*Automatic Loading and Unloading of Objects8Direct Access to Object Structure: Locking and Unlocking8External Storage of Objects: Flattening and UnflatteningDrawing and Hit-Testing ShapesDrawingMapping and ClippingFigure 1-4 Effects of mapping View-Related Objects)Figure 1-5 How QuickDraw GX draws a shape+The Drawing Sequence: Coordinate Conversion(Figure 1-6 A rectangle in geometry spaceAFigure 1-7 A rectangle in local space (transform mapping applied)BFigure 1-8 A rectangle in global space (view port mapping applied)DFigure 1-9 A rectangle in device space (view device mapping applied)Hit-Testing+Figure 1-10 Parts of a line for hit-testingPrinting With QuickDraw GXCore Printing FeaturesHFigure 1-11 Dragging a document to a desktop printer icon on the desktop$Custom Dialog Boxes and Page Formats@Figure 1-12 Printing a single document that has multiple formatsAdvanced Printing Features)The QuickDraw GX Programming EnvironmentSetting Up QuickDraw GX MemoryHandling Errors Debugging$Debugging and Non-Debugging VersionsDebugging With GraphicsBug5Listing 1-1 Sample GraphicsBug heap dump (HD) listing)Programming Conventions and ConsistenciesObject BehaviorFunctions and Function ResultsFunction Parameters.Table 1-1 Convenience constants for parametersCode Naming Conventions%Relationship to the Macintosh Toolbox1Summary Table and Diagram of QuickDraw GX ObjectsTable 1-2 QuickDraw GX objects8Figure 1-13 Properties of the basic QuickDraw GX objectsShape ObjectsAbout QuickDraw GX Shapes3Figure 2-1 Basic components of a QuickDraw GX shapeAbout Shape ObjectsShape Properties.Figure 2-2 The shape object and its properties
Shape TypeTable 2-1 Shape typesShape Geometry=Figure 2-3 Shape geometry for each type of QuickDraw GX shape
Shape FillTable 2-2 Shape fills%Figure 2-4 Even-odd and winding fills/Table 2-3 Valid shape fills for each shape typeShape AttributesTable 2-4 Shape attributesDefault ShapesModifying Shape PropertiesDrawing ShapesHit-Testing Shapes&Figure 2-5 Shape parts for hit-testingSaving and Restoring ShapesUsing Shape Objects'Creating and Manipulating Shape Objects-Getting and Setting the Default Shape Objects'Creating and Disposing of Shape Objects,Getting the Size of a Shape Object in Memory-Copying, Comparing, and Cloning Shape ObjectsCaching Shape Objects#Loading and Unloading Shape Objects$Manipulating Shape Object Properties?Getting and Setting a Shape Object’s Type, Fill, and Attributes.Copying the Geometry From One Shape to Another>Getting and Setting a Shape Object’s Style, Ink, and Transform=Resetting a Shape Object’s Properties to Their Default Values)Manipulating a Shape Object’s Owner Count3Getting and Setting a Shape Object’s Tag References*Converting Shapes From One Type to Another<Table 2-5 Where to find information on shape-type conversion(Directly Manipulating a Shape’s Geometry1Listing 2-1 Directly accessing a shape’s geometryDrawing and Hit-Testing ShapesDrawing ShapesHit-Testing ShapesListing 2-2 Hit-testing a line"Flattening and Unflattening ShapesListing 2-3 Flattening a shape Listing 2-4 Unflattening a shape3Listing 2-5 A spool function that parses shape data+Shape-Related Functions Described Elsewhere5Table 2-6 Shape-related functions described elsewhereShape Objects Reference Constants and Data TypesThe Shape Object
Shape Type
Shape FillShape AttributesFlatten FlagsThe Spool BlockThe Hit-Test Info Structure Functions(Creating and Manipulating Shape Objects GXGetDefaultShapeGXSetDefaultShape
GXNewShapeGXDisposeShapeGXGetShapeSizeGXCopyToShapeGXCopyDeepToShapeGXEqualShapeGXCloneShapeGXCacheShape GXDisposeShapeCacheGXGetShapeCacheSize$Manipulating Shape Object PropertiesGXGetShapeTypeGXSetShapeTypeGXSetShapeGeometryGXGetShapeFillGXSetShapeFillGXGetShapeStyleGXSetShapeStyleGXGetShapeInkGXSetShapeInkGXGetShapeTransformGXSetShapeTransformGXGetShapeAttributesGXSetShapeAttributesGXResetShapeGXGetShapeOwnersGXGetShapeTagsGXSetShapeTags)Directly Manipulating a Shape’s Geometry GXLockShapeGXUnlockShapeGXGetShapeStructureGXChangedShapeDrawing and Hit-Testing ShapesGXDrawShapeGXHitTestShape)Flattening and Unflattening Shape ObjectsGXFlattenShapeGXUnflattenShape"Application-Defined Spool FunctionMySpoolProcSummary of Shape ObjectsStyle ObjectsAbout Style ObjectsStyle Object Properties.Figure 3-1 The style object and its propertiesNTable 3-1 Where to go for information on style object properties and functionsThe Default Style ObjectUsing Style Objects'Creating and Manipulating Style Objects$Creating and Deleting a Style Object-Copying, Comparing, and Cloning Style Objects;Listing 3-1 Building a style list by copying a style object#Loading and Unloading Style Objects$Manipulating Style Object Properties-Resetting a Style Object’s Default Properties8Getting and Setting Style Attributes and Text Attributes)Manipulating a Style Object’s Owner Count3Getting and Setting a Style Object’s Tag References+Style-Related Functions Described Elsewhere5Table 3-2 Style-related functions described elsewhereStyle Objects ReferenceConstants and Data TypesThe Style Object Functions'Creating and Manipulating Style Objects
GXNewStyleGXDisposeStyleGXCopyToStyleGXEqualStyleGXCloneStyle$Manipulating Style Object PropertiesGXResetStyleGXGetStyleOwnersGXGetStyleTagsGXSetStyleTagsSummary of Style Objects Colors and Color-Related ObjectsAbout Color in QuickDraw GXColor SpacesLuminance-Based Color Spaces Figure 4-1 Luminance color space@Table 4-1 Luminance-based color spaces supported by QuickDraw GX;Figure 4-2 Storage formats for luminance-based color spacesRGB-Based Color SpacesFigure 4-3 RGB color space4Table 4-2 RGB color spaces supported by QuickDraw GX/Figure 4-4 Storage formats for RGB color spaces.Figure 4-5 HSV color space and HLS color space<Table 4-3 HSV and HLS color spaces supported by QuickDraw GX/Figure 4-6 Storage formats for HSV color spacesCMYK Color Spaces%Figure 4-7 Colors in CMYK color space5Table 4-4 CMYK color spaces supported by QuickDraw GX0Figure 4-8 Storage formats for CMYK color spacesUniversal Color SpacesFigure 4-9 Yxy chromaticities:Table 4-5 Universal color spaces supported by QuickDraw GX0Figure 4-10 Storage formats for XYZ color spaces/Figure 4-11 The I and Q axes in YIQ color space6Table 4-6 Video color spaces supported by QuickDraw GX0Figure 4-12 Storage formats for YIQ color spacesIndexed Color Spaces7Table 4-7 Indexed color space supported by QuickDraw GX2Figure 4-13 Storage format for indexed color space Color Spaces With Alpha Channels<Figure 4-14 Showing color transparency with an alpha channel0Color-Component Values, Color Values, and Colors#Color Conversion and Color Matching7Figure 4-15 Color gamuts for two devices (in Yxy space)Color Profiles>Figure 4-16 Profile chromaticities for a device (in Yxy space)1Figure 4-17 A profile response curve for a deviceColor-Matching MethodsNFigure 4-18 Maintaining lightness and maintaining saturation in color matchingWhen Color Matching OccursAbout Color Set ObjectsColor Set Properties3Figure 4-19 The color set object and its propertiesColor Values in a Color SetDefault Color SetsAbout Color Profile ObjectsColor Profile Properties7Figure 4-20 The color profile object and its propertiesProfile DataThe Default Color ProfileZero-Length Profiles&Using Colors and Color-Related ObjectsAssigning Colors to Shapes"Assigning Color Profiles to ColorsComparing and Testing Colors Checking for Out-of-Gamut Colors-Checking Colors for Closeness and Color SpacePredicting Drawing ResultsConverting and Matching Colors=Creating and Manipulating Color Set and Color Profile Objects6Creating and Disposing of a Color Set or Color Profile=Copying, Comparing, and Cloning Color Sets and Color Profiles3Loading and Unloading Color Sets and Color Profiles?Manipulating Object Properties of Color Sets and Color ProfilesManipulating Owner Counts"Getting and Setting Tag References-Manipulating the Colors in a Color Set Object7Manipulating the Profile Data in a Color Profile Object*Colors and Color-Related Objects ReferenceConstants and Data TypesColor-Component ValuesColor ValuesThe Color StructureColor PackingColor SpacesThe Color Set ObjectThe gxSetColor UnionThe Color Profile ObjectColor FunctionsGXCheckColorGXGetColorDistanceGXCombineColorGXConvertColorColor Set Functions+Creating and Manipulating Color Set ObjectsGXGetDefaultColorSetGXSetDefaultColorSetGXNewColorSetGXDisposeColorSetGXCopyToColorSetGXEqualColorSetGXCloneColorSet(Manipulating Color Set Object PropertiesGXGetColorSetOwnersGXGetColorSetTagsGXSetColorSetTags.Retrieving and Replacing Colors in a Color SetGXGetColorSetGXSetColorSetGXGetColorSetPartsGXSetColorSetPartsColor Profile Functions/Creating and Manipulating Color Profile ObjectsGXGetDefaultColorProfileGXNewColorProfileGXDisposeColorProfileGXCopyToColorProfileGXEqualColorProfileGXCloneColorProfile,Manipulating Color Profile Object PropertiesGXGetColorProfileOwnersGXGetColorProfileTagsGXSetColorProfileTags,Retrieving and Replacing Profile InformationGXGetColorProfileGXSetColorProfileGXLockColorProfileGXUnlockColorProfileGXGetColorProfileStructure,Summary of Colors and Color-Related ObjectsInk ObjectsAbout Ink ObjectsInk Properties,Figure 5-1 The ink object and its propertiesColorTransfer ModeInk AttributesTable 5-1 Ink attributeThe Default Ink ObjectAbout Transfer ModesTransfer Mode TypesArithmetic Transfer Modes$Figure 5-2 Arithmetic transfer modes6Figure 5-3 Blend example with different operand valuesHighlight Transfer Mode"Figure 5-4 Highlight transfer modeBoolean Transfer Modes/Figure 5-5 Boolean transfer modes (1-bit depth)Pseudo-Boolean Transfer Modes(Figure 5-6 Pseudo-Boolean transfer modesAlpha-Channel Transfer Modes'Figure 5-7 Alpha-channel transfer modesOFigure 5-8 Typical modes used to determine result opacity for the alpha channelFigure 5-9 Anti-aliasingTransfer Mode Color SpaceQFigure 5-10 Automatic conversion of color values during a transfer mode operationColor LimitsCFigure 5-11 Maximum and minimum color-component values in RGB space?Figure 5-12 How minimum and maximum color limits affect drawingHFigure 5-13 How reversed minimum and maximum color limits affect drawingIFigure 5-14 The effects of reversing maximum and minimum in a color spaceSource Color Limits8Figure 5-15 The effect of source color limits on drawingDestination Color Limits=Figure 5-16 The effect of destination color limits on drawingResult Color Limits8Figure 5-17 The effect of result color limits on drawingTransfer Mode MatricesFlagsTransfer Component FlagsTransfer Mode Flags"Summary of Transfer Mode Operation.Figure 5-18 Summary of transfer mode operationUsing Ink Objects%Creating and Manipulating Ink Objects%Creating and Disposing of Ink Objects+Copying, Comparing, and Cloning Ink Objects!Loading and Unloading Ink Objects"Manipulating Ink Object Properties.Getting and Setting an Ink Object’s Attributes(Manipulating an Ink Object’s Owner Count2Getting and Setting an Ink Object’s Tag References*Getting and Setting an Ink Object’s Color 1Getting and Setting an Ink Object’s Transfer ModeWorking With Transfer Modes&Simple Source-to-Destination Transfers$Drawing Selected Parts of the Source,Preserving Selected Parts of the DestinationCopying or Preserving LuminanceEFigure 5-19 Applying color by preserving luminance in the destinationModifying Luminance$Isolating and Modifying Color RangesMaskingPartial TransparencyAnti-AliasingMaking Color SeparationsTransfer Modes and PrintingInk Objects ReferenceConstants and Data TypesThe Ink ObjectInk AttributesColor StructureTransfer Mode StructureTransfer Mode FlagsTransfer Component Structure%Component Modes (Transfer Mode Types)Transfer Component Flags Functions%Creating and Manipulating Ink ObjectsGXNewInkGXDisposeInkGXCopyToInk
GXEqualInk
GXCloneInk"Manipulating Ink Object Properties
GXResetInkGXGetInkAttributesGXSetInkAttributesGXGetShapeInkAttributesGXSetShapeInkAttributesGXGetInkOwnersGXGetInkTagsGXSetInkTags"Getting and Setting an Ink’s ColorGXGetInkColorGXSetInkColorGXGetShapeColorGXSetShapeColor*Getting and Setting an Ink’s Transfer ModeGXGetInkTransferGXSetInkTransferGXGetShapeTransferGXSetShapeTransferSummary of Ink ObjectsTransform ObjectsAbout Transform ObjectsTransform Object Properties2Figure 6-1 The transform object and its propertiesClipFigure 6-2 A transform clip"Figure 6-3 A framed transform clipSFigure 6-4 Converting a framed shape with a nonzero pen width into a transform clip-Figure 6-5 Using a bitmap as a transform clipJFigure 6-6 Modifying a transform clip by subtracting it from another shapeMapping+Figure 6-7 Effects of the transform mappingView Port ListHit-Test ParametersHTable 6-1 Shape parts for hit-testing, from the gxShapeParts enumerationDefault Transform ObjectsUsing Transform Objects+Creating and Manipulating Transform Objects+Creating and Disposing of Transform Objects8Listing 6-1 Creating and disposing of a transform object1Copying, Comparing, and Cloning Transform Objects@Listing 6-2 Cloning a transform to prevent it from being deleted&Implicit Creation of Transform Objects'Loading and Unloading Transform Objects(Manipulating Transform Object Properties-Manipulating a Transform Object’s Owner Count7Getting and Setting a Transform Object’s Tag References&Resetting Default Transform Properties2Getting, Setting, and Modifying the Transform ClipSTable 6-2 Constructive geometry operations between transform clips and other shapesUFigure 6-8 Constructive geometry operations with a polygon clip and a rectangle shape-Moving, Scaling, Rotating, and Skewing ShapesModifying the Transform MappingKListing 6-3 Modifying a shape’s transform with transform-mapping calls onlyYListing 6-4 Modifying a shape’s transform with transform-mapping and shape-geometry callsModifying Shape GeometryBListing 6-5 Modifying a shape’s geometry with shape-geometry callsManipulating the View Port List*Listing 6-6 Getting and setting view portsSetting Up Hit-Test ParametersTransform Objects ReferenceConstants and Data TypesThe Transform ObjectShape Parts for Hit-Testing Functions+Creating and Manipulating Transform ObjectsGXNewTransformGXDisposeTransformGXCopyToTransformGXEqualTransformGXCloneTransform(Manipulating Transform Object PropertiesGXResetTransformGXGetTransformOwnersGXGetTransformTagsGXSetTransformTagsGetting and Setting the ClipGXGetTransformClipGXSetTransformClipGXGetShapeClipGXSetShapeClip2Performing Geometric Operations on Transform ClipsGXUnionTransformGXIntersectTransformGXDifferenceTransformGXReverseDifferenceTransformGXExcludeTransformGetting and Setting the MappingGXGetTransformMappingGXSetTransformMappingGXGetShapeMappingGXSetShapeMapping3Transforming Shapes by Modifying Transform MappingsGXMoveTransformGXMoveTransformToGXScaleTransformGXRotateTransformGXSkewTransformGXMapTransform1Transforming Shapes by Modifying Shape GeometriesGXMoveShapeGXMoveShapeToGXScaleShapeGXRotateShapeGXSkewShape
GXMapShape&Getting and Setting the View Port ListGXGetTransformViewPortsGXSetTransformViewPortsGXGetShapeViewPortsGXSetShapeViewPorts+Getting and Setting the Hit-Test ParametersGXGetTransformHitTestGXSetTransformHitTestGXGetShapeHitTestGXSetShapeHitTestSummary of Transform ObjectsView-Related Objects/About View Ports, View Devices, and View Groups0Figure 7-1 Objects used by the drawing mechanismAbout View Port ObjectsView Port Properties&Figure 7-2 View port object propertiesView Port Clip and Mapping-Figure 7-3 Clipping and mapping in view portsDither$Table 7-1 Dither levels and patternsHalftoneFigure 7-4 Halftone angleFigure 7-5 Halftone frequencyFigure 7-6 Halftone dot typesParent and Child View Ports.Figure 7-7 Hierarchical view ports in a window Figure 7-8 A view port hierarchyView Port AttributesTable 7-2 View port attributesThe Default View Port ObjectView Port Objects and Windows Figure 7-9 View ports in windowsEFigure 7-10 Adjusting a child view port’s mapping to handle scrollingAbout View Device Objects/Figure 7-11 View ports overlapping view devicesView Device Properties)Figure 7-12 View device object propertiesView Device Clip and MappingView Device BitmapView Device Attributes Table 7-3 View device attributesThe Default View Device Object(View Device Objects and Physical DevicesAbout View Group ObjectsView Groups Have No Properties"Onscreen and Offscreen View Groups2About Drawing, Coordinate Conversion, and ClippingQuickDraw GX Coordinates-Figure 7-13 The QuickDraw GX coordinate planeGeometry Space:Figure 7-14 A shape geometry and a transform clip geometryLocal SpaceAFigure 7-15 Applying the transform’s clip and mapping to a shape Global SpaceGFigure 7-16 Applying the child view port’s mapping and clip to a shape HFigure 7-17 Applying the parent view port’s mapping and clip to a shape Device SpaceBFigure 7-18 Applying the view device’s mapping and clip to a shape*Figure 7-19 The shape as finally displayedUsing View-Related ObjectsUsing View Ports+Creating and Manipulating View Port Objects(Manipulating View Port Object PropertiesCListing 7-1 Changing a view port’s dither, halftone, and attributesAListing 7-2 Copying the view ports from one view group to another2Getting and Setting a View Port’s Clip and Mapping*Listing 7-3 Changing a view port’s mapping$Listing 7-4 Setting a view port clip/Setting Up the View Port Hierarchy for a Window/Listing 7-5 Setting up a view port for a window Supporting Scrolling in a Window5Listing 7-6 Supporting scrolling in a child view port&Identifying a View Port’s View Devices6Listing 7-7 Setting a shape color for XOR highlighting Identifying a Shape’s View Ports Measuring a Shape in Local SpaceOListing 7-8 Locating the bounding rectangles of a list of shapes in a view portUsing View Devices-Creating and Manipulating View Device Objects&Listing 7-9 Creating a new view deviceDListing 7-10 Copying the view devices from one view group to another*Manipulating View Device Object Properties4Getting and Setting a View Device’s Clip and Mapping=Listing 7-11 Returning the mapping from local to device space"Identifying a Shape’s View Devices>Listing 7-12 Setting up a data structure for offscreen drawing!Measuring a Shape in Device SpaceHit-Testing a Shape on a DeviceUsing View Groups,Creating and Manipulating View Group Objects>Listing 7-13 Setting up a data structure for offscreen drawing"Setting Up an Offscreen View GroupHListing 7-14 Setting up a view port and view group for offscreen drawing!Measuring a Shape in Global SpaceFListing 7-15 Returning the characteristics of an offscreen device areaView-Related Objects ReferenceConstants and Data TypesThe View Port Object The Halftone Structure Dot Types
Tint TypesView Port AttributesThe View Device ObjectView Device AttributesThe View Group ObjectView Group TypesView Port Functions+Creating and Manipulating View Port ObjectsGXNewViewPortGXDisposeViewPortGXCopyToViewPortGXEqualViewPort(Manipulating View Port Object PropertiesGXGetViewPortClipGXSetViewPortClipGXGetViewPortMappingGXSetViewPortMappingGXGetViewPortGlobalMappingGXGetViewPortDitherGXSetViewPortDitherGXGetViewPortHalftoneGXSetViewPortHalftoneGXGetHalftoneDeviceAngleGXGetViewPortParentGXSetViewPortParentGXGetViewPortChildrenGXSetViewPortChildrenGXGetViewPortViewGroupGXSetViewPortViewGroupGXGetViewPortAttributesGXSetViewPortAttributesGXGetViewPortTagsGXSetViewPortTags6Retrieving the View Devices That Intersect a View PortGXGetViewPortViewDevices0Retrieving the View Ports That Intersect a ShapeGXGetShapeGlobalViewPorts&Measuring a Shape in Local CoordinatesGXGetShapeLocalBoundsView Device Functions-Creating and Manipulating View Device ObjectsGXNewViewDeviceGXDisposeViewDeviceGXCopyToViewDeviceGXEqualViewDevice*Manipulating View Device Object PropertiesGXGetViewDeviceClipGXSetViewDeviceClipGXGetViewDeviceMappingGXSetViewDeviceMappingGXGetViewDeviceBitmapGXSetViewDeviceBitmapGXGetViewDeviceViewGroupGXSetViewDeviceViewGroupGXGetViewDeviceAttributesGXSetViewDeviceAttributesGXGetViewDeviceTagsGXSetViewDeviceTags2Retrieving the View Devices That Intersect a ShapeGXGetShapeGlobalViewDevices'Measuring a Shape in Device CoordinatesGXGetShapeDeviceBoundsGXGetShapeDeviceArea=Measuring the Colors and Pattern Width of a Shape on a DeviceGXGetShapeDeviceColorsHit-Testing a Shape on a DeviceGXHitTestDeviceView Group Functions,Creating and Disposing of View Group ObjectsGXNewViewGroupGXDisposeViewGroup7Getting the View Ports and View Devices of a View GroupGXGetViewGroupViewPortsGXGetViewGroupViewDevices'Measuring a Shape in Global CoordinatesGXGetShapeGlobalBounds Summary of View-Related ObjectsTag ObjectsAbout Tag ObjectsTag Object Properties,Figure 8-1 The tag object and its properties Tag Types+Table 8-1 Defined tag types for tag objectsUses for Tag ObjectsUsing Tag Objects%Creating and Manipulating Tag Objects"Creating and Deleting a Tag Object2Listing 8-1 Adding data to a shape as a tag object+Copying, Comparing, and Cloning Tag Objects!Loading and Unloading Tag Objects"Manipulating Tag Object Properties8Getting and Setting a Tag Object’s Tag Type and Contents3Listing 8-2 Retrieving the contents of a tag object'Manipulating a Tag Object’s Owner Count)Directly Manipulating Tag Object Contents'Attaching Tags to a QuickDraw GX ObjectTag Objects ReferenceConstants and Data TypesThe Tag Object Functions%Creating and Manipulating Tag ObjectsGXNewTagGXDisposeTagGXCopyToTag
GXEqualTag
GXCloneTag"Manipulating Tag Object PropertiesGXGetTagGXSetTagGXGetTagOwners.Directly Manipulating the Data in a Tag Object GXLockTagGXUnlockTagGXGetTagStructureSummary of Tag ObjectsGlossaryIndex